<?php
// no direct access
defined('_JEXEC') or die;
require_once 'Mobile_Detect.php';
$detect = new Mobile_Detect;
if ( $detect->isMobile() ) {
    include('pack-n-price_mobile.php');
    return;
}
$db =& JFactory::getDBO();
$tmplpath	= JURI::base().'templates/'.$template;
$db->setQuery("SELECT title, introtext text FROM `#__content` where id=9");
$article=$db->loadObject();
$params=JComponentHelper::getParams('com_questions');

$basecost=$params->get("price1");
$medcost=$params->get("price2");
$hicost=$params->get("price3");
$fitcost=$params->get("price4");
$fee=$params->get("memberfee");
?>
<div class="wrapper">
	<div class="content clearfix" id="price-page">
		<h1 class="hd">Pakker/Priser</h1>
		<div class="price-left">
			<?php 
					  $dbo=JFactory::getDbo();
					  $query="select * from #__content where id=18";
					  $dbo->setQuery($query);
					  $row=$dbo->loadObject();
		    ?>
			<div class="col-box">
				
				<?php echo $row->introtext;?>
			</div>
			<div class="col-box">
				
				<div class="box-temp clearfix">
					<div id="b-1">
					  <?php echo $row->fulltext;?>
					</div>
					<div id="b-2">
						<table id="m-table">
							<tbody><tr>
								<th>Slanke<br> Pakke 1</th>
								<th>Slanke<br> Pakke 2</th>
								<th>Slanke<br> Pakke 3</th>
								<th>Fitness<br> Pakke</th>
							</tr>
							<tr>
								<td>
									<strong>Kr. <?php echo $basecost?>,-</strong>
									<span>Pr. måned</span>
								</td>
								<td>
									<strong>Kr. <?php echo $medcost?>,-</strong>
									<span>Pr. måned</span>
								</td>
								<td>
									<strong>Kr. <?php echo $hicost?>,-</strong>
									<span>Pr. måned</span>
								</td>
								<td>
									<strong>Kr. <?php echo $fitcost?>,-</strong>
									<span>Pr. måned</span>
								</td>
							</tr>
						</tbody></table>
					</div>
				</div>
				<table id="m-table2">
					<tbody>
					<?php 
					  $dbo=JFactory::getDbo();
					  $query="select * from #__questions_core where catid=10";
					  $dbo->setQuery($query);
					  $row=$dbo->loadObjectList();
					 $n=count($row);
					?>
					<?php for($i=0;$i<$n;$i++){
					 //print_r($row[$i]);die();
					?>
					   <tr <?php if(($i%2)!=0) echo "class='even'"?>>
						<td class="t-col-1">
							<p>
								<a class="tip_trigger" href="#" title="">
								<img src="templates/fitplan/img/imgInfo.png" alt="">
								<span class="tip">
<?php echo nl2br($row[$i]->text);?>
								<span class="arr-left"></span></span>
								</a>
								<?php echo $row[$i]->title;?>
							</p>
						</td>
						<td class="t-col-2">
							<?php if($row[$i]->published==1):?>
								<img src="templates/fitplan/img/imgCheck-1.png" alt="">
							<?php endif;?>
						</td>
						<td class="t-col-3">
							<?php 
							$query="select * from #__questions_core where catid=11 and title='".addslashes($row[$i]->title)."'";
							$dbo->setQuery($query);
							$row1=$dbo->loadObject();
							?>
							<?php if($row1->published==1):?>
								<img src="templates/fitplan/img/imgCheck-1.png" alt="">
							<?php endif;?>
						</td>
						<td class="t-col-4">
							<?php 
							$query="select * from #__questions_core where catid=12 and title='".addslashes($row[$i]->title)."'";
							$dbo->setQuery($query);
							$row1=$dbo->loadObject();
							?>
							<?php if($row1->published==1):?>
								<img src="templates/fitplan/img/imgCheck-1.png" alt="">
							<?php endif;?>
						</td>
						<td class="t-col-4">
							<?php 
							$query="select * from #__questions_core where catid=16 and title='".addslashes($row[$i]->title)."'";
							$dbo->setQuery($query);
							$row1=$dbo->loadObject();
							?>
							<?php if($row1->published==1):?>
								<img src="templates/fitplan/img/imgCheck-1.png" alt="">
							<?php endif;?>
						</td>
					</tr>
					<?php }?>

				</tbody></table>
			</div>
<?php /*?>
			<div class="col-box">
				<h1 class="c292929">Vælg tilkøb (valgfrit)</h1>
				
				<p id="p-pricetemp" style="width:159px;">Pris</p>
				<div class="clr"></div>
				<table id="m-table3">
					<tbody>
					<?php 
							   $query="select * from #__questions_core where catid=15";
					           $dbo->setQuery($query);
					           $rowvaelg=$dbo->loadObjectList();
					?>
					<?php for($i=0;$i<count($rowvaelg);$i++){?>
					  <tr <?php if(($i%2)==1) echo "class='even'"?>>
						<td class="t-col-5-">
							<p>
							  <a href="#" title="" class="tip_trigger">
							     <img src="templates/fitplan/img/imgInfo.png" alt="">
							     <span class="tip">
							        <?php echo nl2br($rowvaelg[$i]->text);?>
                                    <span class="arr-left"></span></span>
							  </a><?php echo $rowvaelg[$i]->title;?></p>
						</td>
						<td class="t-col-6-">
							Kr. <?php echo $rowvaelg[$i]->parent?>,-
						</td>
						
					 </tr>
					<?php }?>
					
					
					
				</tbody></table>
			</div>
<?php */?>
		</div>
		<div class="price-right">
			<a href="<?php echo JRoute::_("index.php?option=com_users&view=registration&Itemid=105")?>" id="btnSignup2">Opret Bruger nu</a>
			<div class="box-right">
				<div class="box-hd clearfix">
					<h2><?php echo str_replace(" - block", "", $article->title)?></h2>
					<img src="<?php echo $tmplpath?>/img/imgInfo-2.png" alt="">
				</div>
				<div class="box-price-content">
					<?php echo $article->text?>
				</div>
			</div>
<?php
$db->setQuery("SELECT title, introtext text FROM `#__content` where id=7");
$article=$db->loadObject();
?>
			<div class="box-right">
				<div class="box-hd clearfix">
					<h2><?php echo str_replace(" - block", "", $article->title)?></h2>
					<img src="<?php echo $tmplpath?>/img/imgInfo-1.png" alt="">
				</div>
				<div class="box-price-content">
					<?php echo $article->text?>
				</div>
			</div>
<?php /*
$db->setQuery("SELECT title, introtext text FROM `#__content` where id=8");
$article=$db->loadObject();
?>
			<div class="box-right">
				<div class="box-hd clearfix">
					<h2>Kundeservice</h2>
					<img src="<?php echo $tmplpath?>/img/imgInfo-3.png" alt="">
				</div>
				<div class="box-price-content">
					<?php echo $article->text?>
				</div>
			</div>
<?php */?>
		</div>
	</div>
</div>
<!--pack n price-->
<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = 982967144;
var google_custom_params = window.google_tag_params;
var google_remarketing_only = true;
/* ]]> */
</script>
<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">
</script>

<noscript>
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="//googleads.g.doubleclick.net/pagead/viewthroughconversion/982967144/?value=0&amp;guid=ON&amp;script=0"/>
</div>
</noscript>
<?php
return;
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers');

// Create shortcuts to some parameters.
$params		= $this->item->params;
$images = json_decode($this->item->images);
$urls = json_decode($this->item->urls);
$canEdit	= $this->item->params->get('access-edit');
$user		= JFactory::getUser();